package com.stylefeng.guns.modular.system.warpper;

import com.stylefeng.guns.common.constant.factory.ConstantFactory;
import com.stylefeng.guns.common.warpper.BaseControllerWarpper;
import com.stylefeng.guns.modular.util.StringUtil;

import java.util.Map;

import org.springframework.util.LinkedCaseInsensitiveMap;

/**
 * 部门列表的包装
 *
 * @author fengshuonan
 * @date 2017年4月25日 18:10:31
 */
public class NoticeWrapper extends BaseControllerWarpper {

	public NoticeWrapper(Object list) {
		super(list);
	}

	@Override
    public void warpTheMap(Map<String, Object> map) {
    	Map<String, Object> tempMap=new LinkedCaseInsensitiveMap<Object>(); 
    	tempMap.putAll(map); 
    	map.putAll(tempMap);
        Integer creater = Integer.parseInt(StringUtil.nullToDefault(map.get("CREATER"),"0"));
        map.put("CREATERNAME", ConstantFactory.me().getUserNameById(creater));
    }

}
